package com.johnny.servlet.controller;

import com.johnny.servlet.pojo.Result;
import com.johnny.servlet.service.EmpService;
import com.johnny.servlet.service.impl.EmpServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class EmpController {

    @Autowired
    private EmpService empService;

    @RequestMapping("/listEmp")
    public Result ListController() {
        return Result.success(empService.listEmp());
    }
}
